const componentProperties = new Map();

const dataStyle = {
	background: {
		type: 'color',
		bgImage: '',
		bgColor: '',
	},
	marginLeft: 0,
	marginRight: 0,
	marginTop: 0,
	marginBottom: 0,
	borderRadiusTop: 0,
	borderRadiusBottom: 0,
	padding: 0,
};

// 目前支持的组件信息.....
// 数据版本  每次修改组件数据  需要对版本进行修改
// componentProperties.set('componentPropertiesVersion', 'V1.0.0')

componentProperties.set('captiontext', {
	component: 'captiontext',
	text: '标题栏',
	type: 'titleBlock',
	active: true,
	style: 'captiontextsstyle',
	setStyle: {
		text: '标题栏',
		height: 50, //框体高度
		skew: 0, //偏移
		src: '',
		bgColor: '',
		location: 'left', // center or left
		title: {
			//  标题相关配置
			text: '标题栏',
			color: '#111111',
			textFontSize: 16,
			other: [], // 字体样式
		},
		subtitle: {
			// 副标题相关配置
			text: '',
			color: 'rgba(150, 151, 153, 10)',
			textFontSize: 12,
			other: [], // 字体样式
		},

		more: {
			//查看更多
			show: 1, //是否显示查看更多
			text: '更多', //自定义文字
			url: '',
		},
		dataStyle: dataStyle,
	},
});

componentProperties.set('pageSetting', {
	component: 'pageSetting',
	text: '导航设置',
	type: 'pageSetting',
	active: true,
	style: 'pageSetting',
	setStyle: {
		background: {
			//背景设置
			bgColor: '', //背景颜色
			bgImg: '', // 背景图片
		},

		name: '页面设置',
		mode: 'inner',
		alwaysShow: 1,
		type: 'color',
		color: '',
		src: '',
		placeholder: 1,
		list: {
			mp: [
				// {
				// 	width: 0,
				// 	height: 0,
				// 	top: 0,
				// 	left: 0,
				// 	type: 'search',
				// 	text: '',
				// 	textColor: '',
				// 	src: '',
				// 	url: '',
				// 	placeholder: '请输入关键字',
				// 	borderRadius: 0,
				// },
			],
			h5: [
				// {
				// 	width: 0,
				// 	height: 0,
				// 	top: 0,
				// 	left: 0,
				// 	type: 'search',
				// 	text: '',
				// 	textColor: '',
				// 	src: '',
				// 	url: '',
				// 	placeholder: '请输入关键字',
				// 	borderRadius: 0,
				// },
			],
		},
		dataStyle: dataStyle,
	},
});

// 商品卡片
componentProperties.set('goodsCard', {
	component: 'goodsCard',
	text: '商品卡片',
	type: 'goodsCard',
	active: true,
	style: 'goodsCardstyle',
	setStyle: {
		text: '商品卡片',
		mode: 1,
		goodsList: [],
		tagStyle: {
			// 角标
			show: false,
			src: '',
		},
		goodsFields: {
			title: {
				color: '#3498db',
				show: true,
			},
			price: {
				color: '#95a5a6',
				show: true,
			},
			subtitle: {
				color: '#95a5a6',
				show: true,
			},
			//  原价
			original_price: {
				color: '#95a5a6',
				show: true,
			},
			sales: {
				// 销量
				color: '#95a5a6',
				show: true,
			},
			stock: {
				// 库存
				color: '#95a5a6',
				show: true,
			},
		},
		borderRadiusTop: 0,
		borderRadiusBottom: 0,
		space: 0,
		buyNowStyle: {
			mode: 1,
			text: '立即购买', // 加购文字
			src: '', // 加购图片
			bg1: '', // 背景1
			bg2: '', // 背景2
		},
		dataStyle: dataStyle,
	},
});

componentProperties.set('goodsShelves', {
	component: 'goodsShelves',
	text: '商品栏',
	type: 'goodsShelves',
	active: true,
	style: 'goodsShelvesstyle',
	setStyle: {
		text: '商品栏',
		mode: 1,
		goodsList: [],
		tagStyle: {
			show: false,
			src: '',
		},
		goodsFields: {
			title: {
				color: '#3498db',
				show: true,
			},
			price: {
				color: '#95a5a6',
				show: true,
			},
		},
		borderRadiusTop: 0,
		borderRadiusBottom: 0,
		space: 0,
		dataStyle: dataStyle,
	},
});

componentProperties.set('pictureads', {
	component: 'pictureads',
	text: '图片广告',
	type: '1-3',
	active: true,
	style: 'pictureadsstyle',
	setStyle: {
		text: '图片广告',
		swiperType: 0, // 选择模板
		borderRadius: 0, // 图片倒角
		pageMargin: 0, // 页面边距
		imageMargin: 0, // 图片边距
		pagingType: 0, // 分页类型: 0/"bullets"/"fraction"/"progressbar"
		rowindividual: 2, // 一行个数
		imageList: [], // 添加图片
		dataStyle: dataStyle,
	},
});

componentProperties.set('pictureshow', {
	component: 'pictureshow',
	text: '图片展示',
	type: 'imageBlock',
	active: true,
	style: 'pictureshowstyle',
	setStyle: {
		text: '图片展示',
		src: '',
		url: '',
		dataStyle: dataStyle,
	},
});

componentProperties.set('graphicnavigation', {
	component: 'graphicnavigation',
	text: '图文导航',
	type: 'menuButton',
	active: true,
	style: 'graphicnavigationstyle',
	setStyle: {
		text: '图文导航',
		list: [], // 图片导航列表
		row: 1,
		col: 5,
		layout: 1,
		dataStyle: dataStyle,
	},
});

componentProperties.set('richtext', {
	component: 'richtext',
	text: '富文本',
	type: '1-10',
	active: true,
	style: 'richtextstyle',
	setStyle: {
		text: '富文本',
		myValue: '', //富文本内容
		backColor: 'rgb(249, 249, 249)', //背景颜色
		dataStyle: dataStyle,
	},
});
componentProperties.set('magiccube', {
	component: 'magiccube',
	text: '魔方',
	type: 'imageCube',
	active: true,
	style: 'magiccubestyle',
	setStyle: {
		text: '魔方',
		rubiksCubeType: 0, // 魔方类型
		borderRadiusTop: 0, //页面间距
		borderRadiusBottom: 0, //图片间隙
		space: 0,
		list: [
			{
				src: '',
				url: '',
			},
			{
				src: '',
				url: '',
			},
			{
				src: '',
				url: '',
			},
			{
				src: '',
				url: '',
			},
			{
				src: '',
				url: '',
			},
		], //图片列表
		dataStyle: dataStyle,
	},
});
componentProperties.set('auxiliarysegmentation', {
	component: 'auxiliarysegmentation',
	text: '辅助分割',
	type: 'lineBlock',
	active: true,
	style: 'auxiliarysegmentationstyle',
	setStyle: {
		text: '辅助分割222',
		blankHeight: 30, //空白高度
		segmentationtype: 0, //分割类型
		paddType: 0, //边距
		auxliarColor: 'rgb(229, 229, 229)', //辅助线颜色
		bordertp: 'solid', //线的类型
		dataStyle: dataStyle,
	},
});
componentProperties.set('commoditysearch', {
	component: 'commoditysearch',
	text: '商品搜索',
	type: 'searchBlock',
	active: true,
	style: 'commoditysearchstyle',
	setStyle: {
		text: '商品搜索',
		heights: 28, //搜索栏高度
		position: 0, //显示位置
		sweep: false, // 显示扫一扫
		borderRadius: 0, //圆角
		textPosition: 0, //文本位置
		placeholder: '', // 提示内容
		backgroundColor: 'rgb(249, 249, 249)', //背景颜色
		borderColor: 'rgb(255, 255, 255)', //框体颜色
		textColor: 'rgb(150, 151, 153)', //字体颜色
		keywords: [], //热词
		dataStyle: dataStyle,
	},
});
componentProperties.set('storeinformation', {
	component: 'storeinformation',
	text: '店铺信息',
	type: '1-12',
	active: true,
	style: 'storeinformationstyle',
	setStyle: {
		text: '店铺信息',
		bakcgroundImg: '', //背景图片
		headPortrait: '', //店铺头像
		rubiksCubeType: 0, //类型
		name: '店铺名称', //店铺名称
		Discount: '在线支付满150减30，满100减20', //优惠信息
		dataStyle: dataStyle,
	},
});
componentProperties.set('entertheshop', {
	component: 'entertheshop',
	text: '列表导航',
	type: 'menuList',
	active: true,
	style: 'entertheshopstyle',
	setStyle: {
		text: '列表导航',
		list: [],
		dataStyle: dataStyle,
	},
});
componentProperties.set('notice', {
	component: 'notice',
	text: '公告',
	type: 'noticeBlock',
	active: true,
	style: 'noticestyle',
	setStyle: {
		text: '公告',
		// noticeText: '', //内容
		src: 'static/img/shop/decorate/notice-1.png',
		mode: 1,
		title: {
			text: '',
			color: '#111111',
		},
		url: '',
		speed: 10,
		dataStyle: dataStyle,
	},
});
componentProperties.set('videoss', {
	component: 'videoss',
	text: '视频',
	type: 'videoPlayer',
	active: true,
	style: 'videostyle',
	setStyle: {
		text: '视频',
		src: '', // 视频地址
		poster: '', // 封面地址
		autoplay: 0, // 是否自动播放
		dataStyle: dataStyle,
	},
});

componentProperties.set('custommodule', {
	component: 'custommodule',
	text: '自定义模块',
	type: 'demo',
	active: true,
	style: 'custommodulestyle',
	setStyle: {
		text: '自定义模块',
		demo: '自定义内容',
		img: 'https://img2.baidu.com/it/u=1905875968,4289754134&fm=26&fmt=auto&gp=0.jpg',
		dataStyle: dataStyle,
	},
});

componentProperties.set('communitypowder', {
	component: 'communitypowder',
	text: '社群涨粉',
	type: '1-14',
	active: true,
	style: 'communitypowderstyle',
	setStyle: {
		text: '社群涨粉',
		mainImg: '', //入口图片
		qrcodeImg: '', //二维码
		title: '标题', //标题
		describe: '辅助描述', //描述
		buttonName: '立即添加', //按钮名称
		backColor: 'rgb(255, 255, 255)', //背景颜色
		dataStyle: dataStyle,
	},
});

componentProperties.set('storenotecard', {
	component: 'storenotecard',
	text: '文章模块',
	type: '2-2',
	active: true,
	style: 'storenotecardstyle',
	setStyle: {
		text: '文章模块',
		name: '这里显示专题名称', //专题名称
		commodityType: 0, // 选择模板
		moditystyle: 0, // 卡片样式选择
		borderRadius: 0, // 图片边角
		textWeight: 400, // 标题粗细
		noteLabels: true, // 笔记标签
		readingNumber: true, // 阅读数
		praisePoints: true, //点赞数
		viewMore1: true, //更多1
		viewMore2: true, //更多2
		imageList: [],
		positions: 'bottom', //标题位置
		linktype: '10',
		http: {},
		dataStyle: dataStyle,
	},
});
componentProperties.set('crowdoperation', {
	component: 'crowdoperation',
	text: '人群运营',
	type: '1-17',
	active: true,
	style: 'crowdoperationstyle',
	setStyle: {
		text: '人群运营',
		dataStyle: dataStyle,
	},
});
componentProperties.set('personalizedrecommendation', {
	component: 'personalizedrecommendation',
	text: '个性化推荐',
	type: '1-18',
	active: true,
	style: 'personalizedrecommendationstyle',
	setStyle: {
		text: '个性化推荐',
		dataStyle: dataStyle,
	},
});
componentProperties.set('onlineservice', {
	component: 'onlineservice',
	text: '在线客服',
	type: '1-19',
	active: true,
	style: 'onlineservicestyle',
	setStyle: {
		text: '在线客服',
		dataStyle: dataStyle,
	},
});

// 暂时移除表单功能发布....
// componentProperties.set('investigate', {
// 	component: 'investigate',
// 	text: '表单模块',
// 	type: '2-3',
// 	active: true,
// 	style: 'investigatestyle',
// 	setStyle: {
// 		text: '表单模块',
// 		title: '表单模块',
// 		jsonData: [], //value1为sass显示内容，value2为前端显示内容
// 	},
// });
componentProperties.set('tabBar', {
	component: 'tabBar',
	text: '底部导航',
	type: '1-5',
	active: true,
	style: 'tabBarStyle',
	setStyle: {
		text: '底部导航',
		mode: 1,
		layout: 1,
		inactiveColor: '#EEEEEE',
		activeColor: '#000000',
		list: [],
		dataStyle: dataStyle,
	},
});

componentProperties.set('follow', {
	component: 'follow',
	text: '关注公众号',
	type: '1-15',
	active: true,
	style: 'followStyle',
	setStyle: {
		text: '关注公众号',
		heade: 'https://imgs.starfirelink.com/miniShop//logo_1618466110849.png',
		followName: '公众号名称',
		followAppId: '',
		dataStyle: dataStyle,
	},
});

componentProperties.set('suspension', {
	component: 'suspension',
	text: '悬浮按钮',
	type: '1-16',
	active: true,
	style: 'suspensionstyle',
	setStyle: {
		text: '悬浮按钮',
		iconList: [],
		http: {},
		border: false,
		dataStyle: dataStyle,
	},
});

// 悬浮按钮组件设置
componentProperties.set('floatbut', {
	component: 'floatbut',
	text: '悬浮按钮',
	type: '1-16',
	active: true,
	style: 'floatbutstyle',

	setStyle: {
		text: '悬浮按钮',
		// 是否显示
		show: 0,
		mode: 1,
		isText: 0,
		// 按钮位置, 0: 走下角,1:右下角, 2:左上角，3:右上角
		location: 0,
		list: [],
		// 菜单方向，0: 水平, 1:垂直
		// menuPosition: 0,
		// 菜单名称是否显示 0:不显示，1:显示，
		// showTitile: 1,
		// 按钮位置, 0: 走下角,1:右下角, 2:左上角，3:右上角
		// butPosition: 1,

		// iconList: [],
		// http: {},
		dataStyle: dataStyle,
	},
});

//弹窗广告
componentProperties.set('popupad', {
	component: 'popupad',
	text: '弹窗广告',
	type: '1-22',
	active: true,
	style: 'popupadstyle',
	setStyle: {
		text: '弹窗广告',
		list: [],
		// 设置多张广告.....
		dataStyle: dataStyle,
	},
});

//
componentProperties.set('usercard', {
	component: 'usercard',
	text: '会员卡片',
	type: 'userCard',
	active: true,
	style: 'usercardstyle',
	setStyle: {
		text: '会员卡片',
		linktype: '10',
		img: '',
		href: '',
		// 0: 只显示一次，1: 应用启动时显示
		showType: 1,
		dataStyle: dataStyle,
	},
});

componentProperties.set('userorder', {
	component: 'userorder',
	text: '订单卡片',
	type: 'userorder',
	active: true,
	style: 'userorderstyle',
	setStyle: {
		text: '订单卡片',
		list: [],
		dataStyle: dataStyle,
	},
});

componentProperties.set('userasset', {
	component: 'userasset',
	text: '资产卡片',
	type: 'walletCard',
	active: true,
	style: 'userassetstyle',
	setStyle: {
		text: '资产卡卷',
		linktype: '10',
		img: '',
		iconList: [],
		// 0: 只显示一次，1: 应用启动时显示
		showType: 1,
		dataStyle: dataStyle,
	},
});

componentProperties.set('usercoupon', {
	component: 'usercoupon',
	text: '卡券卡片',
	type: 'couponCard',
	active: true,
	style: 'usercouponstyle',
	setStyle: {
		text: '卡券卡片',
		list: [],
		dataStyle: dataStyle,
	},
});

// 宫格导航
componentProperties.set('gridbar', {
	component: 'gridbar',
	text: '宫格导航',
	type: 'menuGrid',
	active: true,
	style: 'gridbarstyle',
	setStyle: {
		text: '宫格导航',
		col: 3,
		list: [],
		dataStyle: dataStyle,
	},
});

// 轮播图
componentProperties.set('carousel', {
	component: 'carousel',
	text: '轮播图',
	type: 'imageBanner',
	active: true,
	style: 'carouselstyle',
	setStyle: {
		text: '轮播图',
		autoplay: true,
		// 自动切换间隔时间
		interval: 5000,
		// 滑动动画时间
		duration: 500,
		mode: 1,
		indicator: 1,
		list: [],
		dataStyle: dataStyle,
	},
});

// 辅助线

componentProperties.set('assistline', {
	component: 'assistline',
	text: '辅助线',
	type: 'lineBlock',
	active: true,
	style: 'assistlinestyle',
	setStyle: {
		text: '辅助线',
		blankHeight: 0, //空白高度
		lineColor: '#982929', //辅助线颜色
		mode: 'solid', //线的类型
		dataStyle: dataStyle,
	},
});

// 热区...
componentProperties.set('hotzone', {
	component: 'hotzone',
	text: '热区',
	type: 'hotzone',
	active: true,
	style: 'hotzonestyle',
	setStyle: {
		text: '热区',
		src: '',
		list: [],
		dataStyle: dataStyle,
	},
});

// 拼团
componentProperties.set('pingtuan', {
	component: 'pingtuan',
	text: '拼团',
	type: 'groupon',
	active: true,
	style: 'pingtuanstyle',
	setStyle: {
		text: '拼团',
		activityList: [],
		goodsList: [],
		mode: 1,
		tagStyle: {
			show: 0,
			src: '',
		},
		goodsFields: {
			title: {
				show: 1,
				color: '#000',
			},
			subtitle: {
				show: 1,
				color: '#999',
			},
			price: {
				show: 1,
				color: '#FF0000',
			},
			original_price: {
				show: 1,
				color: '#C4C4C4',
			},
			sales: {
				show: 1,
				color: '#c4c4c4',
			},

			stock: {
				show: 1,
				color: '#c4c4c4',
			},
		},
		buyNowStyle: {
			mode: 1,
			text: '立即拼团',
			color1: '#2AAE67',
			color2: '#3ACD72',
			src: '',
		},
		borderRadiusTop: 0,
		borderRadiusBottom: 0,
		space: 0,
		dataStyle: dataStyle,
	},
});

// 秒杀
componentProperties.set('seckill', {
	component: 'seckill',
	text: '秒杀',
	type: 'seckill',
	active: true,
	style: 'seckillstyle',
	setStyle: {
		text: '秒杀',
		activityList: [],
		goodsList: [],
		mode: 1,
		tagStyle: {
			show: 0,
			src: '',
		},
		goodsFields: {
			title: {
				show: 1,
				color: '#000',
			},
			subtitle: {
				show: 1,
				color: '#999',
			},
			price: {
				show: 1,
				color: '#FF0000',
			},
			original_price: {
				show: 1,
				color: '#C4C4C4',
			},
			sales: {
				show: 1,
				color: '#c4c4c4',
			},
			stock: {
				show: 1,
				color: '#c4c4c4',
			},
		},
		buyNowStyle: {
			mode: 1,
			text: '去抢购',
			color1: '#E9B461',
			color2: '#EECC89',
			src: '',
		},
		borderRadiusTop: 0,
		borderRadiusBottom: 0,
		space: 0,
		dataStyle: dataStyle,
	},
});

// 积分商城
componentProperties.set('shopScore', {
	component: 'shopScore',
	text: '积分商城',
	type: 'scoreGoods',
	active: true,
	style: 'shopScorestyle',
	setStyle: {
		text: '积分商城',
		goodsIds: [],
		goodsList: [],
		mode: 1,
		goodsFields: {
			title: {
				show: 1,
				color: '#333',
			},
			subtitle: {
				show: 1,
				color: '#999',
			},
			score_price: {
				show: 1,
				color: '#FF3000',
			},
			price: {
				show: 1,
				color: '#C4C4C4',
			},
		},
		buyNowStyle: {
			mode: 1,
			text: '去兑换',
			color1: '#E9B461',
			color2: '#EECC89',
			src: '',
		},
		borderRadiusTop: 0,
		borderRadiusBottom: 0,
		space: 0,
		dataStyle: dataStyle,
	},
});

// 优惠券
componentProperties.set('coupon', {
	component: 'coupon',
	text: '优惠券',
	type: 'coupon',
	active: true,
	style: 'couponstyle',
	setStyle: {
		text: '优惠券',
		couponIds: [],
		couponList: [],
		mode: 1,
		fill: {
			color: '',
			bgImage: '',
		},
		button: {
			color: '',
			bgColor: '',
		},
		space: 28,
		dataStyle: dataStyle,
	},
});

export default componentProperties;
